<template>
    <div>
        <h1>热门推荐</h1>
        <van-row>
            <van-col v-for="item in list" span="24" :key="item.id">
                <!-- <p>{{item}}</p> -->

                <img @click="jump(item.id)" :src="item.img" width="100%" alt="">
                <p style="line-height: 0.3rem;">{{item.title}}</p>
                <p style="font-size: 0.16rem; color: grey; line-height: 0.22rem;">{{item.subtitle}}</p>
                <p style="color: red; font-size: 0.24rem; line-height: 0.3rem;">${{item.price}}{{item.unit}}</p>
            </van-col>
        </van-row>
    </div>
</template>

<script>
export default {
    props: {
        list: [Array, Object],
    },
    methods: {
        jump( val) {
            // console.log(val);
            this.$router.push('/productdetail'+val)
        },
    },
};
</script>

<style>
</style>